﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LinkEdit.aspx.cs" Inherits="BoCaiWeb.WebSite.WebAdmin.LinkEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><%=id > 0 ? "修改友情链接" : "新建友情链接"%></title>
    <link href="/css/admin/admin.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script type="text/javascript" src="/js/admin/admin.js"></script>
    <!--uploadify配置Begin-->
    <link rel="stylesheet" href="/js/uploadify/uploadify.css" />
    <script type="text/javascript" charset="utf-8" src="/js/uploadify/jquery.uploadify.js"></script>
	<script type="text/javascript">
	    $(function () {
	        $('#file_upload').uploadify({
	            'formData': {
	                'cid': '<%=id %>'
	            },
	            'buttonText': 'logo图片',
	            'queueSizeLimit': 1,
	            'swf': '/js/uploadify/uploadify.swf',
	            'uploader': 'Ajax/uploadify.ashx?t=2',
	            'onUploadSuccess': function (file, data, response) {
	                var obj = $.parseJSON(data);
	                if (obj.error == 0) {
	                    $("#logo").val(obj.url);
	                }
	            }
	        });
	    });
	</script>
    <!--uploadify配置End-->
</head>
<body>
    <div class="titlebt"><%=id > 0 ? "修改链接" : "新建链接"%></div>
    <!--显示列表-->
    <div id="all">
        <div class="k_all3">
            <form action="" method="post">
            <table width="100%" cellpadding="0" cellspacing="0" id="bk">
                <tbody>
                    <tr>
                        <td width="326" height="35" align="right">
                            <span class="red">*</span>标题：
                        </td>
                        <td width="990">
                            <input id="name" type="text" name="name" value="<%=info.Name %>"  data-val="true" data-val-required="*请填写标题！" />
                            <span class="field-validation-valid" data-valmsg-for="name" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td height="35" align="right">
                            <span class="red">*</span>链接：
                        </td>
                        <td width="990">
                            <input id="url" type="text" name="url" value="<%=info.Url %>" style="width:350px"  data-val="true" data-val-required="*请填写链接！" />
                            <span class="field-validation-valid" data-valmsg-for="url" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td height="35" align="right">
                            <span class="red">*</span>logo图片：
                        </td>
                        <td width="990">
                            <span>提示：请要上传图片，请上传图片大小为140*50,确保图片不变形<br />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;也可以直接复制图片地址到这里<br /></span>
                            <input id="logo" type="text" name="logo" value="<%=info.Logo %>" style="width:350px"  data-val="true" data-val-required="*请填写logo图片！" />
                            <span class="field-validation-valid" data-valmsg-for="logo" data-valmsg-replace="true"></span>
                            <div>   
                                <input id="file_upload" name="file_upload" type="file" multiple="true"/>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td height="35" align="right">
                            <span class="red">*</span>排序：
                        </td>
                        <td width="990">
                            <input id="sort" type="text" name="sort" value="<%=id > 0?info.Sort:sort %>" style="width:350px" data-val="true" data-val-required="*请填写排序！"  data-val-number="*排序请填写数字！" />
                            <span class="field-validation-valid" data-valmsg-for="sort" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" height="35">
                            <div class="pl200">
                                <input type="submit" class="butt_tle" style="width: 50px" value="确定" />
                                <input type="button" class="butt_tle" style="width: 80px" value="返回列表" onclick='location.href="LinkList.aspx"'/>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
            </form>
        </div>
    </div>
</body>
</html>